package experiments;


import gui.KeyUserFetchWindow;

import com.beust.jcommander.JCommander;

import utils.JCommanderParser;

public class WeeklyCharts {

	/**
	 * @param args last.fm API key, and last.fm user.
	 */
	public static void main(String[] args) {
		JCommanderParser parser = new JCommanderParser();
		JCommander jcm = new JCommander(parser, args);
		
		if(parser.getKey() == null) {
			if(parser.isHelp())
				jcm.usage();
			else
				System.out.println("Invalid arguments. Call -help for details.");
			return;
		}
		String key = parser.getKey();

		WeeklyChartsActionListener actList = new WeeklyChartsActionListener(key);
		KeyUserFetchWindow kufw = new KeyUserFetchWindow("Weekly charts fetcher", actList);
		actList.registerWindow(kufw);
	}
}